import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Routes,RouterModule } from '@angular/router';


import { AppComponent } from './app.component';
import { ChildComponent } from './child/child.component';
import { ChildTwoComponent } from './child-two/child-two.component';

var routeConfig: Routes = [
  {path: '', component: ChildComponent},
  {path: 'child2', component: ChildTwoComponent},
]

@NgModule({
  declarations: [
    AppComponent,
    ChildComponent,
    ChildTwoComponent
  ],
  imports: [
    BrowserModule,
    RouterModule.forRoot(routeConfig)
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
